﻿using JuCheap.Core.Model;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace JuCheap.Core.IService.AppService
{
    /// <summary>
    /// 菜单扩展服务
    /// </summary>
    public interface IMenuService
    {
        /// <summary>
        /// 创建菜单
        /// </summary>
        /// <param name="menuReq">菜单请求信息</param>
        /// <returns></returns>
        Task<string> CreateAsync(MenuCreateRequestDto menuReq);

        /// <summary>
        /// 修改菜单
        /// </summary>
        /// <param name="menuReq">菜单请求信息</param>
        /// <returns>用户Id</returns>
        Task<string> UpdateAsync(MenuEditRequestDto menuReq);

        /// <summary>
        /// 加载菜单
        /// </summary>
        /// <param name="filter">过滤条件</param>
        /// <param name="loadAction">是否加载非菜单的数据</param>
        /// <param name="loadSystem">是否加载系统菜单</param>
        /// <returns></returns>
        Task<List<SysMenuDto>> GetMenuAsync(SysMenuFilter filter, bool loadAction, bool loadSystem);

        /// <summary>
        /// 加载菜单树状结构
        /// </summary>
        /// <param name="loadAction">是否加载非菜单的数据</param>
        /// <param name="loadSystem">是否加载系统菜单</param>
        /// <returns></returns>
        Task<List<TreeResponseDto>> GetMenuTreeAsync(bool loadAction, bool loadSystem);

        /// <summary>
        /// 加载菜单表格树状结构
        /// </summary>
        Task<List<SysMenuDto>> GetMenuTableTreeAsync(SysMenuFilter filter);
    }
}
